pub mod proxy;
pub mod client;
pub mod advanced_proxy;
pub mod builder;
pub mod failover;

// 重新导出公共功能模块以保持向后兼容
pub mod retry {
    //! 重试机制模块，重新导出 rustcloud-resilience 功能
    pub use rustcloud_resilience::retry::*;
}

pub mod monitoring {
    //! 监控模块，重新导出 rustcloud-observability 功能
    pub use rustcloud_observability::monitoring::*;
}

pub mod health {
    //! 健康检查模块，重新导出 rustcloud-observability 功能
    pub use rustcloud_observability::health::*;
}

#[cfg(feature = "admin")]
pub mod admin {
    //! 管理接口模块，重新导出 rustcloud-admin 功能
    pub use rustcloud_admin::*;
}

#[cfg(test)]
mod tests;

// 暂时禁用 advanced_proxy_tests 由于编译错误
// #[cfg(test)]
// mod advanced_proxy_tests;

// 主要导出
pub use proxy::*;
pub use advanced_proxy::*;
pub use client::*;
pub use builder::*;
pub use failover::*;

// 预设模块 - 常用功能集合
pub mod prelude {
    pub use crate::proxy::*;
    pub use crate::client::*;
    pub use crate::advanced_proxy::*;
    pub use crate::builder::*;
    pub use crate::failover::*;
    pub use crate::retry::*;
    pub use crate::monitoring::*;
    pub use crate::health::*;
    
    #[cfg(feature = "admin")]
    pub use crate::admin::*;
    
    // 重新导出公共模块的预设
    pub use rustcloud_resilience::prelude::*;
    pub use rustcloud_observability::prelude::*;
    
    #[cfg(feature = "admin")]
    pub use rustcloud_admin::prelude::*;
}